package com.lekang.dto;

import com.fasterxml.jackson.annotation.JsonFormat;

import java.math.BigDecimal;
import java.util.Date;

public class ElderlyRoomInfoDTO {
    // 老人信息
    private Long elderlyId;
    private String elderlyName;
    private String idCard;
    private String gender;
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date birthDate;
    private Integer age;
    private String contact;
    private String photo;

    public String getPhoto() {
        return photo;
    }

    public void setPhoto(String photo) {
        this.photo = photo;
    }

    // 床位信息
    private Long bedId;
    private String bedNo;
    private Integer bedStatus;

    // 房间信息
    private Long roomId;
    private String roomNo;
    private Integer totalBeds;
    private Integer occupiedBeds;
    private BigDecimal occupancyRate;

    // 房型信息
    private Long roomTypeId;
    private String roomType;
    private String roomImage;
    private BigDecimal bedFee;
    private String roomDescription;

    // 微信绑定信息
    private Long wxUserId;
    private Long bindingId;

    // ====================== 新增：入住管理表关联字段 ======================
    private Long checkInId;                  // 入住记录ID
    private String checkInNo;// 入住单号
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date checkInStartTime;           // 入住开始时间
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date checkInEndTime;             // 入住预结束时间
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date checkInFeeStartDate;        // 费用期限开始时间
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date checkInFeeEndDate;          // 费用期限结束时间
    private BigDecimal checkInDeposit;       // 押金
    private BigDecimal checkInNursingFee;    // 入住表中的护理费用（区分护理等级表）
    private BigDecimal checkInBedFee;        // 入住表中的床位费用（区分房型表）
    private BigDecimal checkInOtherFee;      // 其他费用
    private BigDecimal checkInMedicalInsurancePayment; // 医保支付
    private BigDecimal checkInGovernmentSubsidy;        // 政府补贴

    // ====================== 新增：护理等级表关联字段 ======================
    private Long nursingLevelId;             // 护理等级ID
    private String nursingLevelName;         // 护理等级名称
    private BigDecimal nursingLevelFee;      // 护理等级对应的费用（区分入住表）
    private String nursingLevelDescription;  // 护理等级说明
    private Integer nursingLevelStatus;      // 护理等级状态

    // ====================== 新增：账单表关联字段（与 XML 别名完全一致） ======================
    private Long billId;                  // 账单ID（对应 bill.id AS billId）
    private String billNo;                // 账单编号（对应 bill.bill_no AS billNo）
    private String billType;              // 账单类型（对应 bill.bill_type AS billType）
    private String billMonth;             // 账单月份（对应 bill.bill_month AS billMonth）
    private BigDecimal billMonthlyPayable; // 每月应付（对应 bill.monthly_payable AS billMonthlyPayable）
    private BigDecimal billCurrentPayable; // 本期应付（对应 bill.current_payable AS billCurrentPayable）
    private BigDecimal billPrepaymentAmount; // 预交款支付金额（对应 bill.prepayment_amount AS billPrepaymentAmount）
    private BigDecimal billBillAmount;    // 账单金额（对应 bill.bill_amount AS billBillAmount）
    private BigDecimal billPayableAmount; // 应付金额（对应 bill.payable_amount AS billPayableAmount）
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date billPaymentDeadline;     // 支付截至日期（对应 bill.payment_deadline AS billPaymentDeadline）
    private String billTransactionStatus; // 交易状态（对应 bill.transaction_status AS billTransactionStatus）
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date billBillStartTime;       // 账单开始时间（对应 bill.bill_start_time AS billBillStartTime）
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date billBillEndTime;         // 账单结束时间（对应 bill.bill_end_time AS billBillEndTime）
    private Long billCreator;             // 创建人（对应 bill.creator AS billCreator）
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date billCreateTime;          // 创建时间（对应 bill.create_time AS billCreateTime）
    private String billPaymentChannel;    // 支付渠道（对应 bill.payment_channel AS billPaymentChannel）
    private String billPaymentMethod;     // 支付方式（对应 bill.payment_method AS billPaymentMethod）
    private String billPaymentVoucher;    // 支付凭证图片（对应 bill.payment_voucher AS billPaymentVoucher）
    private String billPaymentRemark;     // 支付备注（对应 bill.payment_remark AS billPaymentRemark）
    private String billCancelReason;      // 取消原因（对应 bill.cancel_reason AS billCancelReason）
    private String billRelatedOrder;      // 关联订单（对应 bill.related_order AS billRelatedOrder）
    private String billExtraField1;       // 额外字段1（对应 bill.extra_field1 AS billExtraField1）
    private String billExtraField2;       // 额外字段2（对应 bill.extra_field2 AS billExtraField2）

    // ====================== 新增：余额表关联字段（与 XML 别名完全一致） ======================
    private Long balanceId;                  // 余额记录ID（对应 balance.id AS balanceId）
    private BigDecimal balancePrepaymentBalance; // 预交款余额（对应 balance.prepayment_balance AS balancePrepaymentBalance）
    private BigDecimal balanceDepositBalance;       // 押金余额（对应 balance.deposit_balance AS balanceDepositBalance）
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date balanceUpdateTime;               // 余额更新时间（对应 balance.update_time AS balanceUpdateTime）
    private String balanceExtraField1;             // 余额表额外字段1（对应 balance.extra_field1 AS balanceExtraField1）
    private String balanceExtraField2;             // 余额表额外字段2（对应 balance.extra_field2 AS balanceExtraField2）
    public BigDecimal getBillPrepaymentAmount() {
        return billPrepaymentAmount;
    }

    public String getBalanceExtraField1() {
        return balanceExtraField1;
    }

    public void setBalanceExtraField1(String balanceExtraField1) {
        this.balanceExtraField1 = balanceExtraField1;
    }

    public Long getBalanceId() {
        return balanceId;
    }

    public void setBalanceId(Long balanceId) {
        this.balanceId = balanceId;
    }

    public BigDecimal getBalancePrepaymentBalance() {
        return balancePrepaymentBalance;
    }

    public void setBalancePrepaymentBalance(BigDecimal balancePrepaymentBalance) {
        this.balancePrepaymentBalance = balancePrepaymentBalance;
    }

    public BigDecimal getBalanceDepositBalance() {
        return balanceDepositBalance;
    }

    public void setBalanceDepositBalance(BigDecimal balanceDepositBalance) {
        this.balanceDepositBalance = balanceDepositBalance;
    }

    public Date getBalanceUpdateTime() {
        return balanceUpdateTime;
    }

    public void setBalanceUpdateTime(Date balanceUpdateTime) {
        this.balanceUpdateTime = balanceUpdateTime;
    }

    public String getBalanceExtraField2() {
        return balanceExtraField2;
    }

    public void setBalanceExtraField2(String balanceExtraField2) {
        this.balanceExtraField2 = balanceExtraField2;
    }

    public void setBillPrepaymentAmount(BigDecimal billPrepaymentAmount) {
        this.billPrepaymentAmount = billPrepaymentAmount;
    }

    public Long getBillId() {
        return billId;
    }

    public void setBillId(Long billId) {
        this.billId = billId;
    }

    public String getBillNo() {
        return billNo;
    }

    public void setBillNo(String billNo) {
        this.billNo = billNo;
    }

    public String getBillType() {
        return billType;
    }

    public void setBillType(String billType) {
        this.billType = billType;
    }

    public String getBillMonth() {
        return billMonth;
    }

    public void setBillMonth(String billMonth) {
        this.billMonth = billMonth;
    }

    public BigDecimal getBillMonthlyPayable() {
        return billMonthlyPayable;
    }

    public void setBillMonthlyPayable(BigDecimal billMonthlyPayable) {
        this.billMonthlyPayable = billMonthlyPayable;
    }

    public BigDecimal getBillCurrentPayable() {
        return billCurrentPayable;
    }

    public void setBillCurrentPayable(BigDecimal billCurrentPayable) {
        this.billCurrentPayable = billCurrentPayable;
    }

    public BigDecimal getBillBillAmount() {
        return billBillAmount;
    }

    public void setBillBillAmount(BigDecimal billBillAmount) {
        this.billBillAmount = billBillAmount;
    }

    public BigDecimal getBillPayableAmount() {
        return billPayableAmount;
    }

    public void setBillPayableAmount(BigDecimal billPayableAmount) {
        this.billPayableAmount = billPayableAmount;
    }

    public Date getBillPaymentDeadline() {
        return billPaymentDeadline;
    }

    public void setBillPaymentDeadline(Date billPaymentDeadline) {
        this.billPaymentDeadline = billPaymentDeadline;
    }

    public String getBillTransactionStatus() {
        return billTransactionStatus;
    }

    public void setBillTransactionStatus(String billTransactionStatus) {
        this.billTransactionStatus = billTransactionStatus;
    }

    public Date getBillBillStartTime() {
        return billBillStartTime;
    }

    public void setBillBillStartTime(Date billBillStartTime) {
        this.billBillStartTime = billBillStartTime;
    }

    public Date getBillBillEndTime() {
        return billBillEndTime;
    }

    public void setBillBillEndTime(Date billBillEndTime) {
        this.billBillEndTime = billBillEndTime;
    }

    public Long getBillCreator() {
        return billCreator;
    }

    public void setBillCreator(Long billCreator) {
        this.billCreator = billCreator;
    }

    public Date getBillCreateTime() {
        return billCreateTime;
    }

    public void setBillCreateTime(Date billCreateTime) {
        this.billCreateTime = billCreateTime;
    }

    public String getBillPaymentChannel() {
        return billPaymentChannel;
    }

    public void setBillPaymentChannel(String billPaymentChannel) {
        this.billPaymentChannel = billPaymentChannel;
    }

    public String getBillPaymentMethod() {
        return billPaymentMethod;
    }

    public void setBillPaymentMethod(String billPaymentMethod) {
        this.billPaymentMethod = billPaymentMethod;
    }

    public String getBillPaymentVoucher() {
        return billPaymentVoucher;
    }

    public void setBillPaymentVoucher(String billPaymentVoucher) {
        this.billPaymentVoucher = billPaymentVoucher;
    }

    public String getBillPaymentRemark() {
        return billPaymentRemark;
    }

    public void setBillPaymentRemark(String billPaymentRemark) {
        this.billPaymentRemark = billPaymentRemark;
    }

    public String getBillCancelReason() {
        return billCancelReason;
    }

    public void setBillCancelReason(String billCancelReason) {
        this.billCancelReason = billCancelReason;
    }

    public String getBillRelatedOrder() {
        return billRelatedOrder;
    }

    public void setBillRelatedOrder(String billRelatedOrder) {
        this.billRelatedOrder = billRelatedOrder;
    }

    public String getBillExtraField1() {
        return billExtraField1;
    }

    public void setBillExtraField1(String billExtraField1) {
        this.billExtraField1 = billExtraField1;
    }

    public String getBillExtraField2() {
        return billExtraField2;
    }

    public void setBillExtraField2(String billExtraField2) {
        this.billExtraField2 = billExtraField2;
    }

    // ====================== 原有字段的 Getter/Setter（完全保留） ======================
    public Long getRoomId() {
        return roomId;
    }

    public void setRoomId(Long roomId) {
        this.roomId = roomId;
    }

    public Long getElderlyId() {
        return elderlyId;
    }

    public void setElderlyId(Long elderlyId) {
        this.elderlyId = elderlyId;
    }

    public String getElderlyName() {
        return elderlyName;
    }

    public void setElderlyName(String elderlyName) {
        this.elderlyName = elderlyName;
    }

    public String getIdCard() {
        return idCard;
    }

    public void setIdCard(String idCard) {
        this.idCard = idCard;
    }

    public String getGender() {
        return gender;
    }

    public void setGender(String gender) {
        this.gender = gender;
    }

    public Date getBirthDate() {
        return birthDate;
    }

    public void setBirthDate(Date birthDate) {
        this.birthDate = birthDate;
    }

    public Integer getAge() {
        return age;
    }

    public void setAge(Integer age) {
        this.age = age;
    }

    public String getContact() {
        return contact;
    }

    public void setContact(String contact) {
        this.contact = contact;
    }

    public Long getBedId() {
        return bedId;
    }

    public void setBedId(Long bedId) {
        this.bedId = bedId;
    }

    public String getBedNo() {
        return bedNo;
    }

    public void setBedNo(String bedNo) {
        this.bedNo = bedNo;
    }

    public Integer getBedStatus() {
        return bedStatus;
    }

    public void setBedStatus(Integer bedStatus) {
        this.bedStatus = bedStatus;
    }

    public String getRoomNo() {
        return roomNo;
    }

    public void setRoomNo(String roomNo) {
        this.roomNo = roomNo;
    }

    public Integer getTotalBeds() {
        return totalBeds;
    }

    public void setTotalBeds(Integer totalBeds) {
        this.totalBeds = totalBeds;
    }

    public Integer getOccupiedBeds() {
        return occupiedBeds;
    }

    public void setOccupiedBeds(Integer occupiedBeds) {
        this.occupiedBeds = occupiedBeds;
    }

    public BigDecimal getOccupancyRate() {
        return occupancyRate;
    }

    public void setOccupancyRate(BigDecimal occupancyRate) {
        this.occupancyRate = occupancyRate;
    }

    public Long getRoomTypeId() {
        return roomTypeId;
    }

    public void setRoomTypeId(Long roomTypeId) {
        this.roomTypeId = roomTypeId;
    }

    public String getRoomType() {
        return roomType;
    }

    public void setRoomType(String roomType) {
        this.roomType = roomType;
    }

    public String getRoomImage() {
        return roomImage;
    }

    public void setRoomImage(String roomImage) {
        this.roomImage = roomImage;
    }

    public BigDecimal getBedFee() {
        return bedFee;
    }

    public void setBedFee(BigDecimal bedFee) {
        this.bedFee = bedFee;
    }

    public String getRoomDescription() {
        return roomDescription;
    }

    public void setRoomDescription(String roomDescription) {
        this.roomDescription = roomDescription;
    }

    public Long getWxUserId() {
        return wxUserId;
    }

    public void setWxUserId(Long wxUserId) {
        this.wxUserId = wxUserId;
    }

    public Long getBindingId() {
        return bindingId;
    }

    public void setBindingId(Long bindingId) {
        this.bindingId = bindingId;
    }


    // ====================== 新增字段的 Getter/Setter ======================
    public Long getCheckInId() {
        return checkInId;
    }

    public void setCheckInId(Long checkInId) {
        this.checkInId = checkInId;
    }

    public String getCheckInNo() {
        return checkInNo;
    }

    public void setCheckInNo(String checkInNo) {
        this.checkInNo = checkInNo;
    }

    public Date getCheckInStartTime() {
        return checkInStartTime;
    }

    public void setCheckInStartTime(Date checkInStartTime) {
        this.checkInStartTime = checkInStartTime;
    }

    public Date getCheckInEndTime() {
        return checkInEndTime;
    }

    public void setCheckInEndTime(Date checkInEndTime) {
        this.checkInEndTime = checkInEndTime;
    }

    public Date getCheckInFeeStartDate() {
        return checkInFeeStartDate;
    }

    public void setCheckInFeeStartDate(Date checkInFeeStartDate) {
        this.checkInFeeStartDate = checkInFeeStartDate;
    }

    public Date getCheckInFeeEndDate() {
        return checkInFeeEndDate;
    }

    public void setCheckInFeeEndDate(Date checkInFeeEndDate) {
        this.checkInFeeEndDate = checkInFeeEndDate;
    }

    public BigDecimal getCheckInDeposit() {
        return checkInDeposit;
    }

    public void setCheckInDeposit(BigDecimal checkInDeposit) {
        this.checkInDeposit = checkInDeposit;
    }

    public BigDecimal getCheckInNursingFee() {
        return checkInNursingFee;
    }

    public void setCheckInNursingFee(BigDecimal checkInNursingFee) {
        this.checkInNursingFee = checkInNursingFee;
    }

    public BigDecimal getCheckInBedFee() {
        return checkInBedFee;
    }

    public void setCheckInBedFee(BigDecimal checkInBedFee) {
        this.checkInBedFee = checkInBedFee;
    }

    public BigDecimal getCheckInOtherFee() {
        return checkInOtherFee;
    }

    public void setCheckInOtherFee(BigDecimal checkInOtherFee) {
        this.checkInOtherFee = checkInOtherFee;
    }

    public BigDecimal getCheckInMedicalInsurancePayment() {
        return checkInMedicalInsurancePayment;
    }

    public void setCheckInMedicalInsurancePayment(BigDecimal checkInMedicalInsurancePayment) {
        this.checkInMedicalInsurancePayment = checkInMedicalInsurancePayment;
    }

    public BigDecimal getCheckInGovernmentSubsidy() {
        return checkInGovernmentSubsidy;
    }

    public void setCheckInGovernmentSubsidy(BigDecimal checkInGovernmentSubsidy) {
        this.checkInGovernmentSubsidy = checkInGovernmentSubsidy;
    }

    public Long getNursingLevelId() {
        return nursingLevelId;
    }

    public void setNursingLevelId(Long nursingLevelId) {
        this.nursingLevelId = nursingLevelId;
    }

    public String getNursingLevelName() {
        return nursingLevelName;
    }

    public void setNursingLevelName(String nursingLevelName) {
        this.nursingLevelName = nursingLevelName;
    }

    public BigDecimal getNursingLevelFee() {
        return nursingLevelFee;
    }

    public void setNursingLevelFee(BigDecimal nursingLevelFee) {
        this.nursingLevelFee = nursingLevelFee;
    }

    public String getNursingLevelDescription() {
        return nursingLevelDescription;
    }

    public void setNursingLevelDescription(String nursingLevelDescription) {
        this.nursingLevelDescription = nursingLevelDescription;
    }

    public Integer getNursingLevelStatus() {
        return nursingLevelStatus;
    }

    public void setNursingLevelStatus(Integer nursingLevelStatus) {
        this.nursingLevelStatus = nursingLevelStatus;
    }


    // ====================== 原有 toString 方法（新增字段已补充） ======================


    @Override
    public String toString() {
        return "ElderlyRoomInfoDTO{" +
                "elderlyId=" + elderlyId +
                ", elderlyName='" + elderlyName + '\'' +
                ", idCard='" + idCard + '\'' +
                ", gender='" + gender + '\'' +
                ", birthDate=" + birthDate +
                ", age=" + age +
                ", contact='" + contact + '\'' +
                ", photo='" + photo + '\'' +
                ", bedId=" + bedId +
                ", bedNo='" + bedNo + '\'' +
                ", bedStatus=" + bedStatus +
                ", roomId=" + roomId +
                ", roomNo='" + roomNo + '\'' +
                ", totalBeds=" + totalBeds +
                ", occupiedBeds=" + occupiedBeds +
                ", occupancyRate=" + occupancyRate +
                ", roomTypeId=" + roomTypeId +
                ", roomType='" + roomType + '\'' +
                ", roomImage='" + roomImage + '\'' +
                ", bedFee=" + bedFee +
                ", roomDescription='" + roomDescription + '\'' +
                ", wxUserId=" + wxUserId +
                ", bindingId=" + bindingId +
                ", checkInId=" + checkInId +
                ", checkInNo='" + checkInNo + '\'' +
                ", checkInStartTime=" + checkInStartTime +
                ", checkInEndTime=" + checkInEndTime +
                ", checkInFeeStartDate=" + checkInFeeStartDate +
                ", checkInFeeEndDate=" + checkInFeeEndDate +
                ", checkInDeposit=" + checkInDeposit +
                ", checkInNursingFee=" + checkInNursingFee +
                ", checkInBedFee=" + checkInBedFee +
                ", checkInOtherFee=" + checkInOtherFee +
                ", checkInMedicalInsurancePayment=" + checkInMedicalInsurancePayment +
                ", checkInGovernmentSubsidy=" + checkInGovernmentSubsidy +
                ", nursingLevelId=" + nursingLevelId +
                ", nursingLevelName='" + nursingLevelName + '\'' +
                ", nursingLevelFee=" + nursingLevelFee +
                ", nursingLevelDescription='" + nursingLevelDescription + '\'' +
                ", nursingLevelStatus=" + nursingLevelStatus +
                ", billId=" + billId +
                ", billNo='" + billNo + '\'' +
                ", billType='" + billType + '\'' +
                ", billMonth='" + billMonth + '\'' +
                ", billMonthlyPayable=" + billMonthlyPayable +
                ", billCurrentPayable=" + billCurrentPayable +
                ", billPrepaymentAmount=" + billPrepaymentAmount +
                ", billBillAmount=" + billBillAmount +
                ", billPayableAmount=" + billPayableAmount +
                ", billPaymentDeadline=" + billPaymentDeadline +
                ", billTransactionStatus='" + billTransactionStatus + '\'' +
                ", billBillStartTime=" + billBillStartTime +
                ", billBillEndTime=" + billBillEndTime +
                ", billCreator=" + billCreator +
                ", billCreateTime=" + billCreateTime +
                ", billPaymentChannel='" + billPaymentChannel + '\'' +
                ", billPaymentMethod='" + billPaymentMethod + '\'' +
                ", billPaymentVoucher='" + billPaymentVoucher + '\'' +
                ", billPaymentRemark='" + billPaymentRemark + '\'' +
                ", billCancelReason='" + billCancelReason + '\'' +
                ", billRelatedOrder='" + billRelatedOrder + '\'' +
                ", billExtraField1='" + billExtraField1 + '\'' +
                ", billExtraField2='" + billExtraField2 + '\'' +
                ", balanceId=" + balanceId +
                ", balancePrepaymentBalance=" + balancePrepaymentBalance +
                ", balanceDepositBalance=" + balanceDepositBalance +
                ", balanceUpdateTime=" + balanceUpdateTime +
                ", balanceExtraField1='" + balanceExtraField1 + '\'' +
                ", balanceExtraField2='" + balanceExtraField2 + '\'' +
                '}';
    }
}